<?php
$username = $_GET['username'] ?? 0;
$password = $_GET['password'] ?? 0;
require('../../cofd/common.php');
$sql = "select * from exam_users where username='$username' and password='$password'";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);
if ($row) {
    $response = ['type' => 'success'];
}else{
    $response = ['type' => 'error'];
}
echo json_encode($response, JSON_UNESCAPED_UNICODE);